{include file='_header'}
<form action="" method="post" class="form-horizontal form-validate" enctype="multipart/form-data">
    <div class="page-header">
        当前位置：<span class="text-primary">APP消息推送</span>
    </div>
    <div class="page-content">
        <div class="alert alert-primary">
            <h4 style="font-weight: 500">推送配置说明</h4>
            <p>推送提醒现支持 <a href="https://www.jiguang.cn" target="_blank">极光推送</a>、<a href="https://www.aliyun.com/product/cps?spm=5176.8142029.search.1.12f06d3eqcBThh" target="_blank">阿里云推送</a>两家行业领先接口，接口所有参数需在此处设置。</p>
            <p>参数设置：在此页面开启所需的服务商API并设置服务商提供的参数。</p>
        </div>
        <div class="form-group-title">极光推送<small style="padding-left: 10px;"><a class="text-primary" target="_blank" href="https://www.jiguang.cn/push">立即申请</a></small>
            <span class="pull-right">
                <input type="checkbox" class="js-switch"  name="data[j_push]"  value="1" {if $data['j_push']==1}checked{/if} />
            </span>
        </div>
        <div class="sms-j_push" id="j_push" style="{if empty($data['j_push'])}display: none;{/if}">
            <div class="form-group">
                <label class="col-lg control-label must">appKey</label>
                <div class="col-sm-9 col-xs-12">
                    <input type="text" name="data[jiguang_appKey]" class="form-control valid" value="{$sec['j_push']['jiguang_appKey']}" data-rule-required="true">
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg control-label must">masterSecret</label>
                <div class="col-sm-9 col-xs-12">
                    <input type="text" name="data[jiguang_masterSecret]" class="form-control valid" value="{$sec['j_push']['jiguang_masterSecret']}" data-rule-required="true">
                </div>
            </div>
        </div>
        <!-- <div class="form-group-title">阿里云推送 <small style="padding-left: 10px;"><a class="text-primary" target="_blank" href="https://www.aliyun.com/product/cps?spm=5176.8142029.search.1.12f06d3eqcBThh">立即申请</a></small>
            <span class="pull-right">
                <input type="checkbox" class="js-switch"  name="data[ali_push]"  value="1" {if $data['ali_push']==1}checked{/if} />
            </span>
        </div>
        <div class=" sms-ali_push" id="ali_push" style="{if empty($data['ali_push'])}display: none;{/if}">
            <div class="form-group">
                <label class="col-lg control-label must">accessKeyId</label>
                <div class="col-sm-9 col-xs-12">
                    <input type="text" name="data[ali_accessKeyId]" class="form-control valid" value="{$sec['ali_push']['ali_accessKeyId']}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg control-label must">accessKeySecret</label>
                <div class="col-sm-9 col-xs-12">
                    <input type="text" name="data[ali_accessKeySecret]" class="form-control valid" value="{$sec['ali_push']['ali_accessKeySecret']}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg control-label must">appKey</label>
                <div class="col-sm-9 col-xs-12">
                    <input type="text" name="data[ali_appKey]" class="form-control valid" value="{$sec['ali_push']['ali_appKey']}">
                </div>
            </div>
        </div> -->
        <div class='input-group'>
            <label class="col-lg control-label"></label>
            <span class="">
                <input type="submit" value="保存" class="btn btn-primary ">
            </span>
        </div>
    </div>
</form>

<script>
    $(function () {
        $(":checkbox[name='data[j_push]']").click(function () {
            if ($(this).prop('checked')) {
                $("#j_push").show();
            }
            else {
                $("#j_push").hide();
            }
        });
        $(":checkbox[name='data[ali_push]']").click(function () {
            if ($(this).prop('checked')) {
                $("#ali_push").show();
            }
            else {
                $("#ali_push").hide();
            }
        });
    })
</script>
{include file='_footer'}